﻿using System;
using System.Threading.Tasks;

namespace TaskResult
{
    class Program
    {
        static void Main(string[] args)
        {
            Task<int> task = Task.Run(() => 
            {
                Console.WriteLine("Foo");
                return 0;
            });
            Console.WriteLine(task.Result);
        }
    }
}
